/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package py.sysbi.entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author PROYECTO_2
 */
@Embeddable
public class DiagnosticoDetallePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "diagnostico")
    private int diagnostico;
    @Basic(optional = false)
    @Column(name = "id")
    private int id;

    public DiagnosticoDetallePK() {
    }

    public DiagnosticoDetallePK(int diagnostico, int id) {
        this.diagnostico = diagnostico;
        this.id = id;
    }

    public int getDiagnostico() {
        return diagnostico;
    }

    public void setDiagnostico(int diagnostico) {
        this.diagnostico = diagnostico;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) diagnostico;
        hash += (int) id;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DiagnosticoDetallePK)) {
            return false;
        }
        DiagnosticoDetallePK other = (DiagnosticoDetallePK) object;
        if (this.diagnostico != other.diagnostico) {
            return false;
        }
        if (this.id != other.id) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.sysbi.entidades.DiagnosticoDetallePK[ diagnostico=" + diagnostico + ", id=" + id + " ]";
    }
    
}
